<template>
  <div>
    <!-- 使用全局组件 -->
    <TypeNav></TypeNav>
    <ListContainer></ListContainer>
    <Recommend></Recommend>
    <Rank></Rank>
    <Like></Like>
    <Floor v-for="floor in floorsList" :key="floor.id" :list="floor"></Floor>
    <Brand></Brand>
  </div>
</template>

<script>
import ListContainer from "./ListContainer/index.vue";
import Recommend from "./Recommend/index.vue";
import Rank from "./Rank/index.vue";
import Like from "./Like/index.vue";
import Floor from "./Floor/index.vue";
import Brand from "./Brand/index.vue";
import {mapState} from 'vuex'

export default {
    name: "Home",
    components: { ListContainer, Recommend, Rank, Like, Floor, Brand },
    computed:{
      ...mapState({
        floorsList:(state)=>{
          return state.home.floorsList;
        }
      })
    },
    mounted(){
      this.$store.dispatch('getFloorsList')
    }
}
</script>

<style>

</style>